package com.alliky.home.mvp.presenter

import com.alliky.core.base.BasePresenter
import com.alliky.core.ext.ss
import com.alliky.home.mvp.contract.LoginContract
import com.alliky.home.mvp.model.LoginModel

/**
 * @Author: wxianing
 * @CreateDate: 2022/2/22 21:25
 * @Description: java类作用描述
 */
class LoginPresenter : BasePresenter<LoginContract.Model, LoginContract.View>(),
    LoginContract.Presenter {

    override fun createModel(): LoginContract.Model? = LoginModel()

    override fun doLogin(username: String, password: String) {
        mModel?.doLogin(username, password)?.ss(mModel, mView) {
            mView?.loginSuccess(it.data)
        }
    }

}